package com.sanxiau.dormitory.yang.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.stereotype.Component;

import javax.xml.crypto.Data;
import java.util.Arrays;
import java.util.Date;


public class ResultInfo {
    private int id;
    private String name;
    private String pwd;
    private Date time;
    private String Message;
    private double[] dd;
    private boolean  isexist;
    private int code;

    public ResultInfo() {
    }

    public ResultInfo(int id, String name, String pwd, Date time, String message, double[] dd, boolean isexist, int code) {
        this.id = id;
        this.name = name;
        this.pwd = pwd;
        this.time = time;
        Message = message;
        this.dd = dd;
        this.isexist = isexist;
        this.code = code;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    public Date getTime() {
        return time;
    }
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public void setTime(Date time) {
        this.time = time;
    }

    public String getMessage() {
        return Message;
    }

    public void setMessage(String message) {
        Message = message;
    }

    public double[] getDd() {
        return dd;
    }

    public void setDd(double[] dd) {
        this.dd = dd;
    }

    public boolean isIsexist() {
        return isexist;
    }

    public void setIsexist(boolean isexist) {
        this.isexist = isexist;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getPwd() {
        return pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
    }


    @Override
    public String toString() {
        return "ResultInfo{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", pwd='" + pwd + '\'' +
                ", time=" + time +
                ", Message='" + Message + '\'' +
                ", dd=" + Arrays.toString(dd) +
                ", isexist=" + isexist +
                ", code=" + code +
                '}';
    }
}
